package com.zhanglijie.theory.future.futureandtask;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

import com.zhanglijie.theory.future.Product;
import com.zhanglijie.theory.future.RealProduct;

/**
 * @author zhanglijie
 * @version 1.0
 * @since 1.1.0 2022/8/14 0014 23:52
 */
public class FutureProduct extends FutureTask<RealProduct> implements Product {

    public FutureProduct(Callable<RealProduct> callable){
        super(callable);
    }

    @Override
    public   String getContent() throws InterruptedException, ExecutionException {
      return get().getContent();
    }
}
